package java_DesignPattern.BehavioralPattern.MediatorPattern;

/**
 * 租户类，继承自Person类
 */
public class Tenant extends Person {

    public Tenant(String name, Mediator mediator) {
        super(name, mediator);
    }

    // 租户联系中介者
    @Override
    public void contact(String message) {
        mediator.contact(message, this);
    }

    public void getMessage(String message) {
        System.out.println("租户" + getName() + "收到的信息是" + message);
    }
}
